export class Node<T> {
  next: Node<T> | null = null;
  constructor(public value: T) {}
}

export class DoublyNode<T> extends Node<T> {
  prev: DoublyNode<T> | null = null;
  next: DoublyNode<T> | null = null;
  constructor(value: T) {
    super(value);
  }
}
